package com.dupf.upms.rpc.api;

import com.dupf.upms.dao.model.*;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;
import java.util.Map;

/**
 * 降级实现UpmsApiService接口
 * Created by dupf on 2018/3/1.
 */
public class UpmsApiServiceMock implements UpmsApiService {

    private static final Logger LOGGER = LoggerFactory.getLogger(UpmsApiServiceMock.class);

    @Override
    public List<UpmsPermission> selectUpmsPermissionByUpmsUserId(Integer upmsUserId) {
        LOGGER.info("UpmsApiServiceMock => selectUpmsPermissionByUpmsUserId");
        return null;
    }

    @Override
    public List<UpmsPermission> selectUpmsPermissionByUpmsUserIdByCache(Integer upmsUserId) {
        LOGGER.info("UpmsApiServiceMock => selectUpmsPermissionByUpmsUserIdByCache");
        return null;
    }

    @Override
    public List<UpmsRole> selectUpmsRoleByUpmsUserId(Integer upmsUserId) {
        LOGGER.info("UpmsApiServiceMock => selectUpmsRoleByUpmsUserId");
        return null;
    }

    @Override
    public List<UpmsRole> selectUpmsRoleByUpmsUserIdByCache(Integer upmsUserId) {
        LOGGER.info("UpmsApiServiceMock => selectUpmsRoleByUpmsUserIdByCache");
        return null;
    }

    @Override
    public List<UpmsRolePermission> selectUpmsRolePermisstionByUpmsRoleId(Integer upmsRoleId) {
        LOGGER.info("UpmsApiServiceMock => selectUpmsRolePermisstionByUpmsRoleId");
        return null;
    }

    @Override
    public List<UpmsUserPermission> selectUpmsUserPermissionByUpmsUserId(Integer upmsUserId) {
        LOGGER.info("UpmsApiServiceMock => selectUpmsUserPermissionByUpmsUserId");
        return null;
    }

    @Override
    public List<UpmsSystem> selectUpmsSystemByExample(UpmsSystemExample upmsSystemExample) {
        LOGGER.info("UpmsApiServiceMock => selectUpmsSystemByExample");
        return null;
    }

    @Override
    public List<UpmsOrganization> selectUpmsOrganizationByExample(UpmsOrganizationExample upmsOrganizationExample) {
        LOGGER.info("UpmsApiServiceMock => selectUpmsOrganizationByExample");
        return null;
    }

    @Override
    public UpmsUser selectUpmsUserByUsername(String username) {
        LOGGER.info("UpmsApiServiceMock => selectUpmsUserByUsername");
        return null;
    }

    @Override
    public JSONObject selectUpmsUserInfoByUsername(String username) {
        LOGGER.info("UpmsApiServiceMock => selectUpmsUserInfoByUsername");
        return null;
    }

    @Override
    public List<UpmsRole> getOperableRoles(Integer userId) {
        return null;
    }

    @Override
    public List<UpmsUser> getOperableUserList(String userName, Integer orgId) {
        return null;
    }

    @Override
    public List<UpmsUser> getOperableUserListByCache(String userName, Integer orgId) {
        return null;
    }

    @Override
    public List<UpmsUser> getOrgUserList(Integer orgId) {
        return null;
    }

    @Override
    public JSONObject getOperableUserListWithRole(String userName, Integer orgId, Integer offset, Integer limit) {
        return null;
    }

    @Override
    public JSONArray getOperableListJson(String userName, Integer orgId) {
        return null;
    }

    @Override
    public Integer createEmployee(UpmsUser upmsUser, Integer orgId, Integer roleId) {
        return null;
    }

    @Override
    public int insertUpmsLogSelective(UpmsLog record) {
        LOGGER.info("UpmsApiServiceMock => insertSelective");
        return 0;
    }

    /**
     * 发送验证码
     *
     * @param mobile
     * @return
     */
    @Override
    public boolean sendSmsCode(String mobile) {
        LOGGER.info("UpmsApiServiceMock => sendSmsCode");
        return false;
    }

    /**
     * 校验验证码
     *
     * @param mobile
     * @param smsCode
     * @return
     */
    @Override
    public boolean verifySmsCode(String mobile, String smsCode) {
        LOGGER.info("UpmsApiServiceMock => verifySmsCode");
        return false;
    }

    /**
     * 获取七牛云上传token
     *
     * @param userId
     * @param bucket
     * @param module
     * @return
     */
    @Override
    public Map<String, Object> getQiniuToken(String userId, String bucket, String module) {
        LOGGER.info("UpmsApiServiceMock => getQiniuToken");
        return null;
    }

    /**
     * 直接上传网络图片
     *
     * @param url
     * @param bucket
     * @return
     */
    @Override
    public Map<String, Object> uploadUrlFile(String url, String bucket) {
        LOGGER.info("UpmsApiServiceMock => uploadUrlFile");
        return null;
    }

    @Override
    public List<UpmsUser> getUserListByUserIds(String userIds) {
        return null;
    }
}
